package com.net.shop.car.manager.api.volley.request;

import org.json.JSONException;
import org.json.JSONObject;

import com.net.shop.car.manager.api.volley.Request;
import com.net.shop.car.manager.utils.Constants;
import com.net.shop.car.manager.utils.LogUtils;

/**
 * 注册
 * 
 * @author Deve
 * 
 */
public class Register extends Request {

	/**
	 * 手机号
	 */
	private final String mobile;

	/**
	 * 密码
	 */
	private final String password;

	/**
	 * 验证码
	 */
	private final String rand;

	public Register(String mobile, String password, String rand) {
		super(Constants.REGISTER);
		this.mobile = mobile;
		this.password = password;
		this.rand = rand;
	}

	@Override
	public void extensionJSON(JSONObject jsonObject) {
		try {
			jsonObject.put("mobile", mobile);
			jsonObject.put("password", password);
			jsonObject.put("rand", rand);
		} catch (JSONException e) {
			LogUtils.e(e.getMessage());
		}
	}

}
